<template>
  <div class="information">
    <div class="center-title">
      <img src="../../assets/img/nlzx-title-bg.png" alt="">
      <span>资讯中心</span>
      <img src="../../assets/img/nlzx-title-bg.png" alt="">
    </div>
    <div class="center-sub-title">Information-Center</div>
    <div class="center-box">
      <div class="information-item" v-for="(item, index) in information" :key="index">
        <div class="information-item-img">
          <img :src="item.img" alt="">
        </div>
        <div class="information-item-content">
          <div class="information-item-content-title">{{item.title}}</div>
          <div class="information-item-content-datetime">{{item.datetime}}</div>
          <div class="information-item-content-desc">{{item.desc}}</div>
          <!--<div class="information-item-content-more">查看详情 →</div>-->
        </div>
      </div>
    </div>
    <div class="more-box">
      <div class="more-btn more-btn-more" @click="goMore">更多资讯</div>
    </div>
  </div>
</template>

<script >

export default {
  name: "InformationCenter",
  setup() {
    const information = [
      {
        title: '看《阿凡达：水之道》，一定要来横店影城的CINITY影厅看',
        img: require('../../assets/img/news-img4.png'),
        datetime: '2022-12-02 17:02',
        desc: ''
      },
      {
        title: '横店影视出品《龙马精神》曝全阵容剧照，吴京与成龙首演对手戏',
        img: require('../../assets/img/news-img5.png'),
        datetime: '2022-11-15 17:10',
        desc: ''
      },
      {
        title: '公告 | 2022横店影视节延期举办，我们的故事未完待续',
        img: require('../../assets/img/news-img6.png'),
        datetime: ' 2022-11-15 15:58',
        desc: ''
      },
      {
        title: '青春力量 ！第九届“文荣奖”青年演员扶持计划第七批名单公布',
        img: require('../../assets/img/news-img7.png'),
        datetime: ' 2022-11-12 13:38',
        desc: ''
      },
    ]
    return {
      information
    }
  },
  methods: {
    goMore() {
      this.$router.push({
        path: '/Home/Information'
      })
    }
  }
}
</script>

<style scoped lang="less">
.information {
  background: #EFF2F4;

  .center-title {
    padding-top: 40px;
    font-size: 32px;
    color: #313233;
    letter-spacing: 1.92px;
    font-weight: 500;

    span {
      margin: 0 10px;
      vertical-align: middle;
    }

    img {
      vertical-align: middle;
      width: 24px;
    }
  }

  .center-sub-title {
    margin-top: 10px;
    font-size: 16px;
    color: #B0B5B8;
    letter-spacing: 0.96px;
    text-align: center;
    font-weight: 400;
  }

  .center-box {
    display: flex;
    flex-wrap: wrap;
    width: 1200px;
    margin: 0 auto;
    padding: 40px 0 0;

    .information-item {
      width: calc(25% - 20px);
      //padding: 24px;

      &:not(:last-child) {
        margin-right: 26px;
      }

      .information-item-img {
        width: 100%;
        border-radius: 10px;
        overflow: hidden;
        position: relative; height: 150px;
        img {
          width: 100%; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
        }
      }

      .information-item-content  {
        flex: 1;
        text-align: left;
        margin-bottom: 40px;

        .information-item-content-title {
          margin: 16px 0 5px;
          word-break: break-all;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 2; /* 这里是超出几行省略 */
          overflow: hidden;
          font-size: 18px;
          color: #313233;
          letter-spacing: 1px;
          font-weight: 400;
          line-height: 24px;

        }

        .information-item-content-datetime {
          margin-bottom: 16px;
          font-size: 14px;
          color: #B0B5B8;
          letter-spacing: 0.96px;
          font-weight: 400;
        }

        .information-item-content-desc {
          margin-bottom: 16px;
          word-break: break-all;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 3; /* 这里是超出几行省略 */
          overflow: hidden;
          font-size: 16px;
          color: #A5A5A5;
          letter-spacing: 0.96px;
          text-align: justify;
          font-weight: 400;
          display: none!important;
        }

        .information-item-content-more {
          font-size: 16px;
          color: #B8946E;
          letter-spacing: 0.96px;
          font-weight: 400;
          cursor: pointer;
        }
      }
    }
  }

  .more-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 50px;
    .more-btn {
      margin: 0 12px;
      width: 156px;
      height: 40px;
      line-height: 40px;
      cursor: pointer;
      &:after {
        position: absolute;
        content: '→';
        margin-left: 10px;
        font-size: 12px;
      }
      &.more-btn-more {
        background: rgba(216,216,216,0.00);
        border: 1px solid rgba(200,202,204,1);
        border-radius: 4px;
        font-size: 16px;
        color: #313233;
        text-align: center;
      }
      &.more-btn-heng {
        background: #3D2A24;
        border-radius: 4px;
        font-size: 16px;
        color: #FFFFFF;
        text-align: center;
      }
    }
  }
}

</style>
